Revert to the correct semantics. (#322516)
authorTor Lillqvist <tml@novell.com>
Sun, 27 Nov 2005 00:20:55 +0000 (00:20 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sun, 27 Nov 2005 00:20:55 +0000 (00:20 +0000)
2005-11-27  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
the correct semantics. (#322516)
(gdk_window_set_geometry_hints): Adjust call correspondingly.

ChangeLog
ChangeLog.pre-2-10
gdk/win32/gdkwindow-win32.c

index 3b9f16617e2ae5b000f2bd52988e8ddbb605beaf..6a61448aa365c65f1a0dc23bb8eb0ef5e0aa7ae3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-27  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
+       the correct semantics. (#322516)
+       (gdk_window_set_geometry_hints): Adjust call correspondingly.
+
 2005-11-25  Dom Lachowicz <cinamod@hotmail.com>
 
        * modules/engines/ms-windows/*.[ch]: Merge with gtk-wimp's CVS.
index 3b9f16617e2ae5b000f2bd52988e8ddbb605beaf..6a61448aa365c65f1a0dc23bb8eb0ef5e0aa7ae3 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-27  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
+       the correct semantics. (#322516)
+       (gdk_window_set_geometry_hints): Adjust call correspondingly.
+
 2005-11-25  Dom Lachowicz <cinamod@hotmail.com>
 
        * modules/engines/ms-windows/*.[ch]: Merge with gtk-wimp's CVS.
index 6989710c80f7ccc35f1bc1b3040d634def553908..19c4060d33e58760176a6076b296ec96625bce08 100644 (file)
@@ -1638,13 +1638,9 @@ gdk_window_set_geometry_hints (GdkWindow      *window,
       gdk_window_set_decorations (window,
                                  GDK_DECOR_ALL |
                                  GDK_DECOR_MAXIMIZE);
-      gdk_window_set_decorations (window,
-                                 GDK_DECOR_RESIZEH);
     }
   else
-    gdk_window_set_decorations (window,
-                               GDK_DECOR_RESIZEH |
-                               GDK_DECOR_MAXIMIZE);
+    gdk_window_set_decorations (window, GDK_DECOR_ALL);
 
   if (geom_mask & GDK_HINT_BASE_SIZE)
     {
@@ -2501,6 +2497,7 @@ set_or_clear_style_bits (GdkWindow *window,
 {
   LONG style, exstyle;
   RECT rect, before, after;
+  const LONG settable_bits = WS_BORDER|WS_THICKFRAME|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX;
 
   style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
   exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
@@ -2510,9 +2507,9 @@ set_or_clear_style_bits (GdkWindow *window,
   AdjustWindowRectEx (&before, style, FALSE, exstyle);
 
   if (clear_bits)
-    style &= ~bits;
+    style |= settable_bits, style &= ~bits;
   else
-    style |= bits;
+    style &= ~settable_bits, style |= bits;
 
   SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);